from application import db
from common.models.user import User

class SealOrder(db.Model):
    __tablename__ = 'seal_order'

    id = db.Column(db.Integer, primary_key=True)
    type = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    htsn = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    filesn = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    name = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'))
    dfnum = db.Column(db.Integer)
    cwnum = db.Column(db.Integer)
    cdnum = db.Column(db.Integer)
    num = db.Column(db.Integer)
    uid = db.Column(db.Integer,db.ForeignKey('user.id'))
    mark = db.Column(db.Integer)
    aname = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    bname = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    filename = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'))
    filenum = db.Column(db.Integer)
    project=db.Column(db.String(50, 'utf8mb4_0900_ai_ci'))
    pdnum = db.Column(db.Integer)
    depid = db.Column(db.Integer)
    updated_time = db.Column(db.DateTime)
    created_time = db.Column(db.DateTime)
    creater = db.relationship('User', foreign_keys=uid)